<template>
	<div id="evaluateDetail">
		<v-title :title='title' :text1='text1' :value1='obj.evaluateType' :text2='text2' :value2='obj.evaluationTime' :isShow='isShow'></v-title>
		<div class="d-content">
			<div class="list">
				<strong>网点名称：</strong>
				<span>{{obj.latticeName}}</span>
			</div>
			<div class="list">
				<strong>网点地址：</strong>
				<span>{{obj.latticeAddress}}</span>
			</div>
			<div class="list">
				<strong>办理业务：</strong>
				<span>{{obj.businessName}}</span>
			</div>
			<div class="list">
				<strong>办理窗口：</strong>
				<span>{{obj.windowName}}</span>
			</div>
			<div class="list">
				<strong>预约时间：</strong>
				<span>{{obj.appoDate}} {{obj.startime}}~{{obj.endtime}}</span>
			</div>
			<div class="list">
				<strong>评价来源：</strong>
				<span>{{obj.evaluateType}}</span>
			</div>
			<div class="list">
				<strong>评价人：</strong>
				<span>{{obj.userName}}</span>
			</div>
			<div class="list">
				<strong>评价结果：</strong>
				<span>{{obj.name}}</span>
			</div>
			<div class="list">
				<strong>评价内容：</strong>
				<span>{{obj.leavingMessage}}</span>
			</div>
		</div>
	</div>
</template>
<script>
	import vTitle from './view/titleDiv.vue'
	import { evalateDetail } from "../api/getData"
	export default {
		name: "evaluateDetail",
		components:{
			vTitle
		},
		data() {
			return {
				evaluateId:'',
				title:'评价详情',
				text1:'评价来源：',
				value1:'',
				text2:'评价时间：',
				value2:'',
				isShow:true,
				obj:{},
			};
		},
		created() {
			this.getParams()
		}, // 创建时
		beforeMount() {}, // 挂载之前
		mounted() {
			this.getDetail()
		}, // 挂载之后
		beforeUpdate() {}, // 数据更新时调用,在渲染之前
		updated() {}, // 数据更新后,渲染后调用(禁止)
		beforeDestroy() {}, // 实例销毁前调用,解绑中间层的数据传输
		destroyed() {}, // 实例销毁后调用
		/* beforeRouteLeave(to, from, next) {
        // 设置下一个路由的 meta
        to.meta.keepAlive = true; 
        next();
    }, */
		methods: {
			getParams(){
				var routerParams = this.$route.query.id // 将数据放在当前组件的数据内
				console.log("传来的参数==" + routerParams) 
				this.evaluateId = routerParams 
			},
			getDetail(){
				evalateDetail({"id":this.evaluateId}).then((res) =>{
					console.log(res,"评价详情")
					if(res.data.code === 0){
						this.obj = res.data.data
					}else{
						this.$message.error(res.data.msg)
					}
					
				}).catch((error) =>{
					console.log(error)
				})
			}
		}
	};
</script>
<style lang='scss'>
	#evaluateDetail {
		font-size: 14px;
		.d-content{
			background: #fff;
			margin-top: 24px;
			padding: 40px 0 250px 0;
			.list{
				margin-bottom: 16px;
				width: 100%;
				display:flex;
				strong{
					display: inline-block;
					width: 35%;
					font-weight: normal;
					text-align: right;
					color: #000;
					font-size: 15px;
				}
				span{
					display: inline-block;
					width: 40%;
					padding: 0 12px;
					text-align: left;
					line-height: 1.4;
					color: #808492;
				}
			}
		}
	}
</style>
